package com.atguigu.acyjl;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.atguigu.acyjl.activity.MainActivity;
import com.atguigu.acyjl.activity.PrimaryPage;

public class Lose extends AppCompatActivity {
    Settings settings = new Settings();
    Button loseBtnMarket,loseBtnGoon;
    TextView scoresLose;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lose);
        loseBtnMarket = findViewById(R.id.loseBtnMarket);
        loseBtnGoon = findViewById(R.id.loseBtnGoon);
        scoresLose = findViewById(R.id.scoresLose);

        scoresLose.setText(settings.score);

        loseBtnMarket.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(Lose.this,Market.class);
                startActivity(i);
            }
        });
        loseBtnGoon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(Lose.this, MainActivity.class);//待开发
                startActivity(i);
            }
        });
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        Intent intent = new Intent(Lose.this, PrimaryPage.class);
        startActivity(intent);
    }

}
